{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=153
  Verdict: Accepted
}
uses 
	SysUtils, Math;
 
var
	i,n,a,b,t:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
fillchar(a,sizeof(a),0);
read(n);
a:=1;
b:=1;
for i:=3 to n do begin
	t:=a+b;
	a:=b;
	b:=t;
end;
if n=0 then write(0) else write(b);
end.